<?php
class GroupsController extends AppController{
	
	var $helpers = Array("Form");
	
	function beforeFilter() {
    	parent::beforeFilter(); 
    	$this->Auth->allowedActions = array('login');
	}
	
	
	public function index(){
		
		$this->set('groups',$this->Group->find("all"));
		
	}
	
	public function create(){
		
		if(!empty($this->data)){
			
			if($this->Group->save($this->data)){
				$this->Session->setFlash("Group created");
			}
			
		}
		
	}
	
}